package com.example.data.factory.mapper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.data.factory.common.Dto.SearchByDictNameDto;
import com.example.data.factory.entity.entity.DataStandard;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 数据标准目录 Mapper 接口
 * </p>
 *
 * @author lhy
 * @since 2025-03-03
 */
public interface DataStandardMapper extends BaseMapper<DataStandard> {
    @Select("SELECT COALESCE(MAX(standard_id), 0) FROM data_standard")
    Integer selctMaxId();
    @Select ( "select d.dict_name,d1.* from data_standard d left join dict_data d1 on d.dict_id = d1.dict_id where d.dict_name=#{searchByDictNameDto.dictName} ")
    List<Map<String, Object>> searchbydetail(@Param ("searchByDictNameDto") SearchByDictNameDto searchByDictNameDto);
}
